using abilities.effects;
using LitJson;

namespace abilities.templates
{
    public class EffectImmuneTemplate : EffectTemplate
    {
        public bool canBeAsTarget { get; private set; }

        public EffectImmuneTemplate() : base()
        {
            canBeAsTarget = false;
        }

        public override Effect CreateInstance(int level)
        {
            return new EffectImmune(this,level);
        }

        public override bool FromJson(JsonData value)
        {
            if (!base.FromJson(value))
                return false;
            canBeAsTarget = (bool)value["canBeAsTarget"];

            return true;
        }
    }
}